package com.magicmovie.mapper;

import com.github.pagehelper.Page;
import com.magicmovie.entity.Customer;
import com.magicmovie.utils.QueryFilters;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

@Mapper
public interface CustomerMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Customer record);

    int insertSelective(Customer record);

    Customer selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Customer record);

    int updateByPrimaryKey(Customer record);

    Customer findByUsername(String username);

    Customer findByToken(String token);

    Page<Map<String,Object>> getByFilter(QueryFilters filters);

    Integer queryCount();
}